package com.mango.data.structure.binarytree.array;

/**
 * 数组实现的二叉树
 * @Author: mango
 * @Date: 2022/4/3 6:17 下午
 */
public class ArrayTree<T> {
    private T[] arr;
    private int size;

    public ArrayTree(int length){
        this.arr = (T[]) new Object[length];
        this.size = 0;
    }

    public void add(T node){
        this.arr[size++] = node;
    }
}
